//
//  NSString+timer.m
//  CarTown
//
//  Created by xionghao on 15/8/18.
//  Copyright (c) 2015年 熊浩. All rights reserved.
//

#import "NSString+timer.h"

@implementation NSString (timer)
-(NSDate *)datefromLinuxTime:(NSString *)timestr{
    NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
    [formatter setDateStyle:NSDateFormatterMediumStyle];
    [formatter setTimeStyle:NSDateFormatterShortStyle];
    [formatter setDateFormat:@"yyyy-MM-dd HH:MM:ss"];
    NSTimeZone* timeZone = [NSTimeZone timeZoneWithName:@"Asia/Shanghai"];
    [formatter setTimeZone:timeZone];
  return [formatter dateFromString:timestr];
}
@end
